Fix: random segmentation fault during detach using physics mutex#20
Merged
awesomebytes merged 1 commit intopal-robotics:melodic-develfrom Feb 16, 2022
Merged
Conversation
a7f6db8 to
43d3194
Compare
awesomebytes
requested changes
Feb 14, 2022
Collaborator
awesomebytes
left a comment
There was a problem hiding this comment.
I love the simplicity of the fix!
Cold you please remove the readme changes so i can click on merging straight away?
Thank you very much!!
43d3194 to
1ccaeb6
Compare
Contributor
Author
|
Yep, Done |
awesomebytes
approved these changes
Feb 16, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As already shown here if a detach is issued during a physics engine update a segmentation fault will be generated, resulting in Gazebo crashing.
I would like to share with you my own solution to the problem which I had the opportunity to extensively test and validate during the development of this project. The solution is simple, efficient and reliable and only consists in using the physics mutex accessible through
physics->GetPhysicsUpdateMutex();